package com.itrh.org.domain;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelIgnore;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;

/**
 * ClassName: Department
 *
 * @author XHU_WHY
 * @version V1.0
 * @since 2024/3/29 11:46
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ExcelTarget(value = "department")
public class Department {
    @ApiModelProperty(value = "部门id")
    private Long id;
    @ApiModelProperty(value = "部门名称")
    @Excel(name = "部门名称")
    private String name;
    @ApiModelProperty(value = "部门介绍")
    private String intro;
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;
    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;
    @ApiModelProperty(value = "部门经理")
    private Long managerId;
    @ApiModelProperty(value = "父部门id")
    private Long parentId;
    @ApiModelProperty(value = "路径")
    private String path;
    @ApiModelProperty(value = "状态")
    private Integer state;
    @ApiModelProperty(value = "父部门")
    private Department parent;
    @ApiModelProperty(value = "部门经理")
    private Employee manager;
    @ApiModelProperty(value = "子部门")
    private List<Department> children;
}
